<?php
/* @var $this SiteController */

$this->pageTitle=Yii::app()->name;
?>

<div class="container" style="width:650px;height:400px;">
	<?php
		$user=User::model()->findByPk(Yii::app()->user->id);
		$res='
		<div class="jumbotron">
		<form action="'.Yii::app()->request->baseUrl.'/site/modifySelf" method="post" accept-charset="utf-8" role="form">
			<div class="container">
				<h2>修改信息</h2>
				<table class="table">  
					<tbody>
					<tr>
						<td><input type="text" id="uid" name="uid" value="'.$user->user_id.'" style="display:none"></td>
					</tr> 
					<tr>
						<td><input type="password" name="password" class="form-control" placeholder="修改密码请填写，否则请留空"></td>
					</tr>  
					<tr>
						<td><input type="password" name="repeatPassword" class="form-control" placeholder="再次输入密码"></td>
					</tr>
					<tr>
						<td><input type="text" name="name" value="'.$user->name.'" class="form-control" placeholder="姓名" required=""></td>
					</tr>
					<tr>
						<td><input type="text" name="mail" value="'.$user->mail.'"class="form-control" placeholder="电子邮箱" required="" pattern="^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$" title="邮箱正确格式：xxx@xxx.xxx"></td>
					</tr>
					<tr>
						<td>
							<select id="sex" name="sex" class="form-control" placeholder="性别">
								<option value="0">男</option>
								<option value="1">女</option>
							</select>
						</td>
					</tr>
					<tr>
						<td><input name="modify" class="btn btn-primary" type="submit" role="button" value="修改"/></td>
						<td>
						<div class="btn-group">
						  <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown">
							注销账号<span class="caret"></span>
							<span class="sr-only">Toggle Dropdown</span>
						  </button>
						  <ul class="dropdown-menu"  style="min-width:0px;padding:0 0 0 0;" role="menu">
							<li><input name="delete" class="btn btn-danger" type="submit" role="button" value="确认注销"></li>
						  </ul>
						</div>
						</td>
						<td><a class="btn btn-success" href="'.(Yii::app()->request->baseUrl).'"/site/index role="button">返回</a></td> 
					</tr>  
				</table>  
			</div>
		</form>
		</div>';
		echo $res;
	?>			
</div>

